home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / Asymptote Demo / Examples / Demos / 8) Blackbody Figure / Plot_Next_BlackBody < prev   
Encoding:
Text File  |  1994-05-07  |  712 b   |  31 lines  |  [TEXT/DWat]

  1. % Plot another backbody curve
  2. % This is a helper script for the "Plot_Blackbody_Figure" script
  3.  
  4. % X values are logs.  Need to convert them to use the
  5. % 'Planck' script which expects Hz, not Log Hz.
  6. rpn <x 10^x >x
  7.  
  8. % Calculate the planck function at temperature K
  9. planck &1
  10.  
  11. % Restore the x array log values (for plotting)
  12. rpn <x log >x
  13.  
  14. % Can't take the log of zero so sick something in for all zeros
  15. rpn <y 0 = 1E-2000 * <y + log >y
  16.  
  17. % Draw heavy lines
  18. pensize 1
  19. plotline
  20. pensize 0.25
  21.  
  22. % Add the label and arrow pointing to each curve
  23. moveto x(40) y(40) 12 + T log +
  24. drawlabel 4 \T K
  25. moveto x(40) y(40) 12 + T log +
  26. drawto x(45) y(40) 12 + T log +
  27. scale scale 0.75 *
  28. drawarrowto x(70) y(70)
  29. scale scale 0.75 /
  30.  
  31.